<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Vue</title>
    <!-- development version, includes helpful console warnings -->
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <!-- production version, optimized for size and speed -->
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script src="https://cdn.jsdelivr.net/npm/axios@0.12.0/dist/axios.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/lodash@4.13.1/lodash.min.js"></script>

</head>

<body>
    <ul>
        <li v-for="todo in todos" v-bind:key="todo.id">
            {{ todo.text }}
        </li>
    </ul>

    <ul>
        <li v-for="todo in todos" v-bind:key="todo.id">
            <!-- We have a slot for each todo, passing it the -->
            <!-- `todo` object as a slot prop.                -->
            <slot v-bind:todo="todo">
                <!-- Fallback content -->
                {{ todo.text }}
            </slot>
        </li>
    </ul>

    <todo-list v-bind:todos="todos">
        <!-- Define `slotProps` as the name of our slot scope -->
        <template slot-scope="slotProps">
            <!-- Define a custom template for todo items, using -->
            <!-- `slotProps` to customize each todo.            -->
            <span v-if="slotProps.todo.isComplete">✓</span>
            {{ slotProps.todo.text }}
        </template>
    </todo-list>

    <div class="child">
        <slot text="hello from child"></slot>
    </div>

    <div class="parent">
        <child>
            <template slot-scope="props">
                <span>hello from parent</span>
                <span>{{ props.text }}</span>
            </template>
        </child>
    </div>

    <div class="parent">
        <div class="child">
            <span>hello from parent</span>
            <span>hello from child</span>
        </div>
    </div>

    <todo-list v-bind:todos="todos">
        <template slot-scope="{ todo }">
            <span v-if="todo.isComplete">✓</span>
            {{ todo.text }}
        </template>
    </todo-list>



    



    <script>

    </script>
</body>

</html>